﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Weazel.Willows.Model
{
	public class State 
		: HierarchicalEntity
	{
		protected bool isInitial;
		public bool IsInitial
		{
			get { return isInitial; }
		}

		private static int nameGeneratorCount = 0;
		private static string getUniqueName()
		{
			return string.Format("state{0}", nameGeneratorCount++);
		}

		public State(Module parent, bool isInitial)
			: this(parent, getUniqueName(), isInitial)
		{

		}

		public State(Module parent, string name, bool isInitial) 
			: base(parent, name)
		{
			this.isInitial = isInitial;
		}
	}
}
